<?php

namespace app\common\command;

use think\console\Command;
use think\console\Input;
use think\console\Output;

/**
 * 临时性的业务或测试处理
 */
class Base extends Command
{
    protected $output;
    protected $command="base";
    protected $description="Base 命令行基类";

    protected function configure()
    {
        $this->setName($this->command)->setDescription($this->description);
    }

    /**
     * 执行
     * @param Input $input
     * @param Output $output
     * @return int|void|null
     */
    public function execute(Input $input, Output $output)
    {
        $this->output = $output;
        $this->main();
    }

    public function main()
    {

    }

    public function writeln($str)
    {
        $this->output->writeln(print_r($str, true));
    }
}
